//
//  MessageSessionDao.h
//  SouthChina
//
//  Created by creator_lq on 14/12/4.
//  Copyright (c) 2014年 科创. All rights reserved.
//

#import "DateBaseHelper.h"
#import "Message.h"
#import "MessageDao.h"

@interface MessageSessionDao : DateBaseHelper

+(Message*)updataDBwithSQLiteStatement:(NSDictionary*)msgList;


/**
 *	@brief	根据条件查询MessageSession数据，条件SQL要从where开始
 *
 *	@return	return value description
 */
+(NSArray*)getMessageSession:(NSString*) ConditionSQl;


+(NSArray*)getAllMessageSession;

+(MessageSession*)queryMsgSessionById:(NSString*)sesionId;

+(BOOL)insertMessageSeesion2DB:(MessageSession*)session;

+(BOOL)updateMessageSession:(MessageSession*)session;

+(BOOL)deleteMessageSession:(NSString*)sesionId;

/**
 * 删除传入日期之前的消息
 *
 * @param time
 *            格式为 2014-11-10
 */
+(BOOL)deleteMessageByTime:(NSString*)time session:(NSString*)sesionId;

+(BOOL)deleteMessageSessionAll;

/**
 * 删除传入日期之前的消息
 *
 * @param time
 *            格式为 2014-11-10
 */
+(BOOL)deleteMessageByTime:(NSString*) time;
//查询没有阅读的消息数20150812
+(int)queryMsgCountNoread;



@end
